#include <iostream>
#include "Account.h"

using namespace std;

int main() {
	Account account1(50);
	Account account2(25);
	double amount;

	cout << "account1 balance: $" << account1 << endl;
	cout << "account2 balance: $" << account2 << endl;

	cout << endl << "Enter deposit amount for account1: " ;
	cin >> amount;

	cout << endl << "attempting to add " << amount << " to account1 balance" << endl;
	account1.credit(amount);

	cout << endl << "Now account1 balance is: $" << account1 << endl;

	cout << endl << "Enter withdrawl amount for account1: " ;
	cin >> amount;

	cout << endl << "attempting to subtract " << amount << " from account1 balance" << endl;
	account1.debit(amount);

	cout << endl << "account1 balance: $" << account1 << endl;
	cout << "account2 balance: $" << account2 << endl;

	cout << endl << "Enter withdrawl amount for account2: " ;
	cin >> amount;

	cout << endl << "attempting to subtract " << amount << " from account2 balance" << endl;
	account2.debit(amount);

	cout << endl << "account1 balance: $" << account1 << endl;
	cout << "account2 balance: $" << account2 << endl;

	system("PAUSE");
	return 0;
}
